package com.igd.security.token;

import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * @version 1.0
 * 
 * @author QIAOYU
 * 
 * @date 2013-6-20
 * 
 * @description 扩展shiro用户密码的验证类,增加验证码
 */

public class UsernamePasswordWithChceckCodeToken extends UsernamePasswordToken {

	private static final long serialVersionUID = -1025732799485094388L;
	
	/**验证码值*/
	private String captcha;

	public UsernamePasswordWithChceckCodeToken() {

		super();

	}
	
	public UsernamePasswordWithChceckCodeToken(String username,char[] password, boolean rememberMe, String host, String captcha) {

		super(username,password,rememberMe,host);
		
		this.captcha = captcha;
	}
	
	public String getCaptcha() {
		return captcha;
	}

	public void setCaptcha(String captcha) {
		this.captcha = captcha;
	}

	public String toString() {
		
		return "[userName:'"+this.getUsername()+"',userPass:'"+new String(this.getPassword())+"',captcha:'"+this.getCaptcha()+"']";

	}
}
